<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  .father{
    width: 100px;
    height: 100px;
    background-color: red;
  }
  .son{
    width: 50px;
    height: 50px;
    background-color: blue;
  }
</style>
<body>

  <!-- 修饰指令的 小指令(有功能 ) -->
  <!-- 
    事件修饰符   .stop阻止冒泡  .prevent 阻止默认行为  可以链式
  -->
  <div id="app">
    <!-- <input type="text" @keyup="ku" v-model.trim="con"> -->
    <input type="text" @keyup="ku" v-model.number="con">
    <br>
    <div @click="fatherFn" class="father">
      <!-- <div @click.stop="sonFn" class="son"></div> -->
      <a href="https://www.baidu.com" @click.stop.prevent="sonFn" class="såon">大儿</a>
    </div>
  </div>

  <script src="./js/vue2.6.12.js"></script>

  <script>

    var app = new Vue({
      el:'#app',
      data:{
        con : ''
      },
      methods:{
        ku(){
          console.log(this.con)
        },
        fatherFn(){
          console.log('老父亲被惦记了');
        },
        sonFn(){
          console.log('乖儿被点击了');
        }
      }
    })

    

  </script>
</body>
</html>